<div class="box" style="width: <?php echo $width; ?>px; height: <?php echo $height + $height_s; ?>px;">
  <div id="slideshow<?php echo $module; ?>" class="nivoSlider" style="width: <?php echo $width; ?>px; height: <?php echo $height; ?>px;">
    <?php foreach ($banners as $banner) { ?>
    <?php if ($banner['link']) { ?>
    <a href="<?php echo $banner['link']; ?>">
    	<img src="<?php echo $banner['image']; ?>" data-thumb="<?php if(isset($banner['image_nav'])){ echo $banner['image_nav'];} ?>"  data-title="<?php echo $banner['title']; ?>" />
    </a>
    <?php } else { ?>
    <img src="<?php echo $banner['image']; ?>" data-thumb="<?php if(isset($banner['image_nav'])){ echo $banner['image_nav'];} ?>" data-title="<?php echo $banner['title']; ?>" />
    <?php } ?>
    <?php } ?>
  </div>
</div>
<script type="text/javascript"><!--
$(document).ready(function() {
	$('#slideshow<?php echo $module; ?>').nivoSlider({
		effect: 'fade',
        slices: 1,
        boxCols: 0,
        boxRows: 0,
        animSpeed: 500,
        pauseTime: 3000,
        startSlide: 0,
        <?php if($navType == 0){echo 'controlNav: false,';}else{echo 'controlNav: true,';}?>
        <?php if($navType == 2){echo 'controlNavTitles: true,';}else{echo 'controlNavTitles: false,';}?>
        <?php if($navType == 3){echo 'controlNavThumbs: true,';}else{echo 'controlNavThumbs: false,';}?>
        pauseOnHover: true,
        manualAdvance: false,
        randomStart: false,
        beforeChange: function(){},
        afterChange: function(){},
        slideshowEnd: function(){},
        lastSlide: function(){},
        afterLoad: function(){}
    });
});
--></script>